package com.mars.weixin.common;

import com.alibaba.fastjson.JSON;
import com.mars.weixin.api.ResponseMsg;
import com.mzlion.easyokhttp.HttpClient;

/**
 * 微信工具类
 *
 */
public class WeixinUtil {

	/**
	 * 发送POST请求
	 * @param url 地址
	 * @param obj doPost方法会将数据转换为JSON数据
	 * @return
	 */
	public static ResponseMsg doPost(String url, Object obj) {
		return HttpClient.textBody(url).json(JSON.toJSONString(obj)).execute().asBean(ResponseMsg.class) ;
	}
}
